<div class="admin"> />
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>优惠券管理</strong></div>
        <div class="padding border-bottom">
            <a href="{:U('Voucher/index')}" class="button button-small border-green">返回优惠券列表</a>
        </div>
        <form method="post" action="" name="myForm" id="myForm">
            <table class="table tb-type2 nobdb">
                <thead>
                    <tr class="thead">
                        <th class="align-center">编号</th>
                        <th class="align-center">标题</th>
                        <th class="align-center">领取ID</th>
                        <th class="align-center">领取人</th>
                        <th class="align-center">开始时间</th>
                        <th class="align-center">结束时间</th>
                        <th class="align-center">代金券金额</th>
                        <th class="align-center">使用额度</th>
                        <th class="align-center">发放日期</th>
                        <th class="align-center">状态</th>
                        <th class="align-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                <foreach item="v" name="list">
                    <tr class="hover">
                        <td class="align-center">{$v['voucher_id']}</td>
                        <td>{$v['voucher_title']}</td>
                        <td>{$v['voucher_owner_id']}</td>
                        <td>{$v['voucher_owner_name']}</td>
                        <td class="align-center">{$v['voucher_start_date']|date='Y-m-d H:i:s',###}</td>
                        <td class="align-center">{$v['voucher_end_date']|date='Y-m-d H:i:s',###}</td>
                        <td class="align-center">{$v['voucher_price']}</td>
                        <td class="align-center">{$v['voucher_limit']}</td>
                        <td class="align-center">{$v['voucher_active_date']|date='Y-m-d H:i:s',###}</td>
                        <td class="align-center">
                            <switch name="v.voucher_state">
                            <case value="1"><a class="button bg-green button-little">未用</a></case>
                            <case value="2"><a class="button bg-red button-little">已用</a></case>
                            <default />
                            </switch>
                        </td>
                        <td class="align-center">
                            <a class="button bg-red button-little js-del" href="javascript:;" data="{$v['voucher_id']}" title="删除"><i class="icon-minus-circle"></i>删除</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
                <tfoot>
                    <tr class="tfoot">
                        <td colspan="15"><div class="pages clearfix">{$page}</div></td>
                    </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">
    $('#myForm').layer({
        actionUrl: "batchAction",
        deleteUrl: "del",
    });
</script>